package cn.wudd.web.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping
public class IndexController {

	@RequestMapping("/index")
	public String list(HttpServletRequest request){
		return "index";
	}
	
	@RequestMapping("/hello")
	@ResponseBody
	public Object hello(HttpServletRequest request){
		Map<String,Object> map = new HashMap<>();
		map.put("name", "wudd");
		map.put("sex", "man");
		return map;
	}
	
}